package myapp.com.xm.myapplication;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.xm.httpapi.Annotation.ViewL;
import com.xm.httpapi.BaseView.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import myapp.com.xm.myapplication.Adapter.Adapter3;

@ViewL(R.layout.list2)
public class List2Activity extends BaseActivity {

    private RecyclerView rv_top,rv_tab1;
    private Adapter3 adapter3;

    private List<String> list=new ArrayList<>();

    @Override
    protected void initData(Bundle savedInstanceState) {
        for (int i=0;i<100;i++){
            list.add("111");
        }
        rv_top=findViewById(R.id.rv_top);
        rv_tab1=findViewById(R.id.rv_tab1);
        adapter3=new Adapter3(this,list,R.layout.list_3);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        rv_top.setLayoutManager(layoutManager);
        rv_top.setAdapter(adapter3);
        LinearLayoutManager layoutManager2 = new LinearLayoutManager(this);
        rv_tab1.setLayoutManager(layoutManager2);
        rv_tab1.setAdapter(adapter3);
    }

    @Override
    protected String showTitle() {
        return "333";
    }
}
